export const permission = import.meta.env.VITE_AUTH_PATH // 权限系统

export const requestBody = {
	// 统一请求体
	data: {
		body: {},
		page: {}
	},
	code: 0,
	msg: 'ok',
	serialNo: '',
	success: true
}

export function deepClone(source: object) {
	// 深克隆
	const targetObj = source.constructor === Array ? [] : {}
	Object.keys(source).forEach((keys) => {
		if (source[keys] && typeof source[keys] === 'object') {
			targetObj[keys] = deepClone(source[keys])
		} else {
			targetObj[keys] = source[keys]
		}
	})
	return targetObj
}
